CLASS-ID. Utils as "AFP.Utils".
    environment division.
        configuration section.
            repository.
                class     ClassXmlConfiguration          as "CoolThings.Commons.XmlConfiguration"
                class     SystemString                   as "System.String"
                class     CollectionHashTable            as "System.Collections.Hashtable".
    
    static.
        data division.
            working-storage section.
                01 xmlConfig           usage object reference ClassXmlConfiguration.
                01 driverName          usage object reference SystemString.
                01 keyValue            pic n(200).

        procedure division.
            method-id. GetCheckoutDrivers as "GetCheckoutDrivers" is public.
                data division.
                    linkage section.
                    01 hashTable       usage object reference CollectionHashTable.
                    
                procedure division returning hashTable.
                    invoke ClassXmlConfiguration "GetInstance" returning xmlConfig
                    
                    invoke CollectionHashTable "NEW" returning hashTable
                    
                    set    keyValue    to  xmlConfig::"GetKey"(n"/configuration/checkout/currentSupplier")
                    set    keyValue    to  SystemString::"Concat"(keyValue, n"/currentSet")
                    set    keyValue    to  xmlConfig::"GetKey"(keyValue)

                    set    driverName  to  SystemString::"Concat"(keyValue, n"/cashDrawer")
                    set    driverName  to  xmlConfig::"GetKey"(driverName)
                    
                    invoke hashTable "Add" using "CashDrawer", driverName

                    set    driverName  to  SystemString::"Concat"(keyValue, n"/receiptPrinter")
                    set    driverName  to  xmlConfig::"GetKey"(driverName)
                    
                    invoke hashTable "Add" using "ReceiptPrinter", driverName.
                    
            end method GetCheckoutDrivers.
    end static.
END CLASS Utils.            
